<PHP>
  
function phpescape($str){  
	//return $str;
    $sublen=strlen($str);   
    $reString="";   
    for ($i=0;$i<$sublen;$i++){   
        if(ord($str[$i])>=127){   
            $tmpString=bin2hex(iconv("UTF8","ucs-2",substr($str,$i,2)));    //??GBK??????????,???????   
  
            if (!eregi("WIN",PHP_OS)){   
                $tmpString=substr($tmpString,2,2).substr($tmpString,0,2);   
              }   
            $reString.="%u".$tmpString;   
            $i++;   
          } else {   
            $reString.="%".dechex(ord($str[$i]));   
          }   
      }   
    return $reString;   
} 
	if($init){</PHP>
	<PHP>for($i=1;$i<=$arealevel;$i++){</PHP>
		<div class="con">
		<ul class="ullist" id="list_{$i}">
			<PHP>foreach($list as $vo){ </PHP>
				<php>$selected = ($vo['id'] == $arrPid[$i-1])?"class='on'":"";</php>
				<li id='node_{$vo.id}' {$selected}><a href='javascript:void(0);' onclick=selectarea("{$vo.id}","{$vo.level}",<PHP>echo "\"".phpescape($vo['title'])."\""</PHP>) >{$vo.title}</a></li>
			<PHP>}</PHP>
		</ul>
		</div>
		<php>$list = $list[$arrPid[$i-1]]['child']</php>
	<PHP>}</PHP>
	
<PHP>}else{</PHP>
	<volist id="vo" name="list">
		<li id='node_{$vo.id}'><a href='javascript:void(0);' onclick=selectarea("{$vo.id}","{$vo.level}",<PHP>echo "\"".phpescape($vo['title'])."\""</PHP>) >{$vo.title}</a></li>
	</volist>
<PHP>}</PHP>